<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="jquery-1.3.2.min.js"></script>
<script>
function doAction(postid,type){
	$.post('rating.php',{postid:postid,type:type},function($data){
	if(isNaN( parseFloted ($data))){
			alert($data);
		}
		else{
	$('#'+postid+'_'+type+'s').$text(data);
		}
	});
}
</script>
</head>

<body>
<?php 
include("tech.php");
$postid = 1;
$query =mysql_query(" SELECT 'like','unlike' FROM posts WHERE id='$postid'");
$data = mysql_fetch_object ($query);
?>
<a href="javascript:;"  onclick="doAction("<?php echo $postid;?>","like");">like(<span id="<?php echo $postid;?>_likes"><?php echo $data->like?> </a>
<a href="javascript:;"  onclick="doAction("<?php echo $postid;?>","unlike");">unlike(<span id="<?php echo $postid;?>_unlikes"><?php echo $data->unlike?> </a>
</body>
</html>